package com.banksoft.cps.controller.admin;

import com.banksoft.cps.bean.warpper.SupplierCompanyWarpper;
import com.banksoft.cps.controller.ControllerConstants;
import com.banksoft.cps.service.SupplierCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by rongzhao.zhu on 2018/2/5.
 */
@Controller
@RequestMapping("/admin/supplierCompany/")
public class AdminSupplierCompanyController extends ControllerConstants {
    @Autowired
    SupplierCompanyService supplierCompanyService;
    @RequestMapping(value = "find",produces = "application/json;charset=utf-8")
    @ResponseBody
    public String find(String id){
        SupplierCompanyWarpper bean = supplierCompanyService.findWarpperById(id);
        return toJSONString(createDataTip(bean));
    }
}
